﻿<template>
  <a-modal
    title="编辑门诊病例"
    :width="900"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-form-item label="VISIT_NO " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入VISIT_NO " v-decorator="['visitNo']" />
        </a-form-item>
        <a-form-item label="PATIENT_NAME " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PATIENT_NAME " v-decorator="['patientName']" />
        </a-form-item>
        <a-form-item label="OPER_DATE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择OPER_DATE " v-decorator="['operDate']" @change="onChangeoperDate"/>
        </a-form-item>
        <a-form-item label="DOCTOR_NAME " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入DOCTOR_NAME " v-decorator="['doctorName']" />
        </a-form-item>
        <a-form-item label="DOCTOR_CODE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入DOCTOR_CODE " v-decorator="['doctorCode']" />
        </a-form-item>
        <a-form-item label="ILLNESS_DESC " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入ILLNESS_DESC " v-decorator="['illnessDesc']" />
        </a-form-item>
        <a-form-item label="ANAMNESIS " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入ANAMNESIS " v-decorator="['anamnesis']" />
        </a-form-item>
        <a-form-item label="FAMILY_ILL " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入FAMILY_ILL " v-decorator="['familyIll']" />
        </a-form-item>
        <a-form-item label="MARITAL_STATUS " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入MARITAL_STATUS " v-decorator="['maritalStatus']" />
        </a-form-item>
        <a-form-item label="MENSES " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入MENSES " v-decorator="['menses']" />
        </a-form-item>
        <a-form-item label="MED_HISTORY " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入MED_HISTORY " v-decorator="['medHistory']" />
        </a-form-item>
        <a-form-item label="BODY_EXAM " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入BODY_EXAM " v-decorator="['bodyExam']" />
        </a-form-item>
        <a-form-item label="DIAG_DESC " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入DIAG_DESC " v-decorator="['diagDesc']" />
        </a-form-item>
        <a-form-item label="CDIAG " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入CDIAG " v-decorator="['cdiag']" />
        </a-form-item>
        <a-form-item label="MEDICAL_RECORD " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入MEDICAL_RECORD " v-decorator="['medicalRecord']" />
        </a-form-item>
        <a-form-item label="OPERATION_RECORD " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入OPERATION_RECORD " v-decorator="['operationRecord']" />
        </a-form-item>
        <a-form-item label="INDIVIDUAL " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入INDIVIDUAL " v-decorator="['individual']" />
        </a-form-item>
        <a-form-item label="ADVICE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入ADVICE " v-decorator="['advice']" />
        </a-form-item>
        <a-form-item label="ORDINAL " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入ORDINAL " v-decorator="['ordinal']" />
        </a-form-item>
        <a-form-item label="MEMO " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入MEMO " v-decorator="['memo']" />
        </a-form-item>
        <a-form-item label="ILLNESS_DATE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择ILLNESS_DATE " v-decorator="['illnessDate']" @change="onChangeillnessDate"/>
        </a-form-item>
        <a-form-item label="VISIT_DATE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择VISIT_DATE " v-decorator="['visitDate']" @change="onChangevisitDate"/>
        </a-form-item>
        <a-form-item label="WEIGHT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入WEIGHT " v-decorator="['weight']" />
        </a-form-item>
        <a-form-item label="PATHOLOGICSTATUS " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PATHOLOGICSTATUS " v-decorator="['pathologicstatus']" />
        </a-form-item>
        <a-form-item label="REMARK1 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入REMARK1 " v-decorator="['remark1']" />
        </a-form-item>
        <a-form-item label="PATHOLOGICDEGREE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PATHOLOGICDEGREE " v-decorator="['pathologicdegree']" />
        </a-form-item>
        <a-form-item label="REMARK2 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入REMARK2 " v-decorator="['remark2']" />
        </a-form-item>
        <a-form-item label="PHYSI_STATUS " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PHYSI_STATUS " v-decorator="['physiStatus']" />
        </a-form-item>
        <a-form-item label="PER_HISTORY " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PER_HISTORY " v-decorator="['perHistory']" />
        </a-form-item>
        <a-form-item label="SUPPORT_EXAM " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入SUPPORT_EXAM " v-decorator="['supportExam']" />
        </a-form-item>
        <a-form-item label="CHECK_BOX38 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入CHECK_BOX38 " v-decorator="['checkBox38']" />
        </a-form-item>
        <a-form-item label="CHECK_BOX39 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入CHECK_BOX39 " v-decorator="['checkBox39']" />
        </a-form-item>
        <a-form-item label="CHECK_BOX40 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入CHECK_BOX40 " v-decorator="['checkBox40']" />
        </a-form-item>
        <a-form-item label="CHECK_BOX41 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入CHECK_BOX41 " v-decorator="['checkBox41']" />
        </a-form-item>
        <a-form-item label="RISK_FACTOR " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入RISK_FACTOR " v-decorator="['riskFactor']" />
        </a-form-item>
        <a-form-item label="PAIN_MARK " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PAIN_MARK " v-decorator="['painMark']" />
        </a-form-item>
        <a-form-item label="RISK " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入RISK " v-decorator="['risk']" />
        </a-form-item>
        <a-form-item label="PSY_ASSESSMENT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PSY_ASSESSMENT " v-decorator="['psyAssessment']" />
        </a-form-item>
        <a-form-item label="PAIN_ASSESSMENT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入PAIN_ASSESSMENT " v-decorator="['painAssessment']" />
        </a-form-item>
        <a-form-item label="FALL_ASSESSMENT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入FALL_ASSESSMENT " v-decorator="['fallAssessment']" />
        </a-form-item>
        <a-form-item label="NUTRITIONAL_STATUS " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入NUTRITIONAL_STATUS " v-decorator="['nutritionalStatus']" />
        </a-form-item>
        <a-form-item label="ABNORMAL_EATING " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入ABNORMAL_EATING " v-decorator="['abnormalEating']" />
        </a-form-item>
        <a-form-item label="SUGGEST " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入SUGGEST " v-decorator="['suggest']" />
        </a-form-item>
        <a-form-item label="LEAVE_DIRECTION " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入LEAVE_DIRECTION " v-decorator="['leaveDirection']" />
        </a-form-item>
        <a-form-item label="LEAVE_DATE " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择LEAVE_DATE " v-decorator="['leaveDate']" @change="onChangeleaveDate"/>
        </a-form-item>
        <a-form-item label="NORMAL_ASSESSMENT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入NORMAL_ASSESSMENT " v-decorator="['normalAssessment']" />
        </a-form-item>
        <a-form-item label="LANGUAGE_ASSESSMENT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入LANGUAGE_ASSESSMENT " v-decorator="['languageAssessment']" />
        </a-form-item>
        <a-form-item label="SOCIAL_ASSESSMENT " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入SOCIAL_ASSESSMENT " v-decorator="['socialAssessment']" />
        </a-form-item>
        <a-form-item label="FAITH " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入FAITH " v-decorator="['faith']" />
        </a-form-item>
        <a-form-item label="FAMILY_MEDICAL_HISTORY " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入FAMILY_MEDICAL_HISTORY " v-decorator="['familyMedicalHistory']" />
        </a-form-item>
        <a-form-item label="跌倒风险筛查 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入跌倒风险筛查 " v-decorator="['fallRisk']" />
        </a-form-item>
        <a-form-item label="性别 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入性别 " v-decorator="['patientSex']" />
        </a-form-item>
        <a-form-item label="年龄 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入年龄 " v-decorator="['patientAge']" />
        </a-form-item>
        <a-form-item label="出生日期 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择出生日期 " v-decorator="['patientBirthday']" @change="onChangepatientBirthday"/>
        </a-form-item>
        <a-form-item label="民族 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入民族 " v-decorator="['nation']" />
        </a-form-item>
        <a-form-item label="现住址 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入现住址 " v-decorator="['mailingAddress']" />
        </a-form-item>
        <a-form-item label="职业 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入职业 " v-decorator="['occupation']" />
        </a-form-item>
        <a-form-item label="工作单位 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入工作单位 " v-decorator="['workAddr']" />
        </a-form-item>
        <a-form-item label="联系电话 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入联系电话 " v-decorator="['phoneNo']" />
        </a-form-item>
        <a-form-item label="会员卡种 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入会员卡种 " v-decorator="['vipType']" />
        </a-form-item>
        <a-form-item label="联系人 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入联系人 " v-decorator="['lxr']" />
        </a-form-item>
        <a-form-item label="联系人电话 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入联系人电话 " v-decorator="['lxrdh']" />
        </a-form-item>
        <a-form-item label="联系人关系 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入联系人关系 " v-decorator="['lxrgx']" />
        </a-form-item>
        <a-form-item label="中医诊断 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入中医诊断 " v-decorator="['diagDescZy']" />
        </a-form-item>
        <a-form-item label="医嘱项目 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入医嘱项目 " v-decorator="['yzxm']" />
        </a-form-item>
        <a-form-item label="流行病史 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入流行病史 " v-decorator="['lxbs']" />
        </a-form-item>
        <a-form-item label="患者知情拒绝 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入患者知情拒绝 " v-decorator="['isPatientRefuse']" />
        </a-form-item>
        <a-form-item label="患者知情拒绝内容 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入患者知情拒绝内容 " v-decorator="['patientRefuseComments']" />
        </a-form-item>
        <a-form-item v-show="false"><a-input v-decorator="['iD']" /></a-form-item>
        <a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择创建时间" v-decorator="['createDate']" @change="onChangecreateDate"/>
        </a-form-item>
        <a-form-item label="创建者Id" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入创建者Id" v-decorator="['createUserId']" />
        </a-form-item>
        <a-form-item label="创建者名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入创建者名称" v-decorator="['createUserName']" />
        </a-form-item>
        <a-form-item label="更新时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择更新时间" v-decorator="['modifyDate']" @change="onChangemodifyDate"/>
        </a-form-item>
        <a-form-item label="修改者Id" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入修改者Id" v-decorator="['modifyUserId']" />
        </a-form-item>
        <a-form-item label="修改者名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入修改者名称" v-decorator="['modifyUserName']" />
        </a-form-item>
        <a-form-item label="删除时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择删除时间" v-decorator="['deleteDate']" @change="onChangedeleteDate"/>
        </a-form-item>
        <a-form-item label="删除者ID" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入删除者ID" v-decorator="['deleteUserId']" />
        </a-form-item>
        <a-form-item label="删除者姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入删除者姓名" v-decorator="['deleteUserName']" />
        </a-form-item>
      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>
  import moment from 'moment'
  import {
    OutpMrEdit
  } from '@/api/modular/main/OutpMrManage'
  export default {
    data () {
      return {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 15 }
        },
        operDateDateString: '',
        illnessDateDateString: '',
        visitDateDateString: '',
        leaveDateDateString: '',
        patientBirthdayDateString: '',
        createDateDateString: '',
        modifyDateDateString: '',
        deleteDateDateString: '',
        visible: false,
        confirmLoading: false,
        form: this.$form.createForm(this)
      }
    },
    methods: {
      moment,
      // 初始化方法
      edit (record) {
        this.visible = true
        setTimeout(() => {
          this.form.setFieldsValue(
            {
              iD: record.iD,
              visitNo: record.visitNo,
              patientName: record.patientName,
              doctorName: record.doctorName,
              doctorCode: record.doctorCode,
              illnessDesc: record.illnessDesc,
              anamnesis: record.anamnesis,
              familyIll: record.familyIll,
              maritalStatus: record.maritalStatus,
              menses: record.menses,
              medHistory: record.medHistory,
              bodyExam: record.bodyExam,
              diagDesc: record.diagDesc,
              cdiag: record.cdiag,
              medicalRecord: record.medicalRecord,
              operationRecord: record.operationRecord,
              individual: record.individual,
              advice: record.advice,
              ordinal: record.ordinal,
              memo: record.memo,
              weight: record.weight,
              pathologicstatus: record.pathologicstatus,
              remark1: record.remark1,
              pathologicdegree: record.pathologicdegree,
              remark2: record.remark2,
              physiStatus: record.physiStatus,
              perHistory: record.perHistory,
              supportExam: record.supportExam,
              checkBox38: record.checkBox38,
              checkBox39: record.checkBox39,
              checkBox40: record.checkBox40,
              checkBox41: record.checkBox41,
              riskFactor: record.riskFactor,
              painMark: record.painMark,
              risk: record.risk,
              psyAssessment: record.psyAssessment,
              painAssessment: record.painAssessment,
              fallAssessment: record.fallAssessment,
              nutritionalStatus: record.nutritionalStatus,
              abnormalEating: record.abnormalEating,
              suggest: record.suggest,
              leaveDirection: record.leaveDirection,
              normalAssessment: record.normalAssessment,
              languageAssessment: record.languageAssessment,
              socialAssessment: record.socialAssessment,
              faith: record.faith,
              familyMedicalHistory: record.familyMedicalHistory,
              fallRisk: record.fallRisk,
              patientSex: record.patientSex,
              patientAge: record.patientAge,
              nation: record.nation,
              mailingAddress: record.mailingAddress,
              occupation: record.occupation,
              workAddr: record.workAddr,
              phoneNo: record.phoneNo,
              vipType: record.vipType,
              lxr: record.lxr,
              lxrdh: record.lxrdh,
              lxrgx: record.lxrgx,
              diagDescZy: record.diagDescZy,
              yzxm: record.yzxm,
              lxbs: record.lxbs,
              isPatientRefuse: record.isPatientRefuse,
              patientRefuseComments: record.patientRefuseComments,
              createUserId: record.createUserId,
              createUserName: record.createUserName,
              modifyUserId: record.modifyUserId,
              modifyUserName: record.modifyUserName,
              deleteUserId: record.deleteUserId,
              deleteUserName: record.deleteUserName
            }
          )
        }, 100)
        this.form.getFieldDecorator('operDate', { initialValue: moment(record.operDate, 'YYYY-MM-DD') })
        this.operDateDateString = moment(record.operDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('illnessDate', { initialValue: moment(record.illnessDate, 'YYYY-MM-DD') })
        this.illnessDateDateString = moment(record.illnessDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('visitDate', { initialValue: moment(record.visitDate, 'YYYY-MM-DD') })
        this.visitDateDateString = moment(record.visitDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('leaveDate', { initialValue: moment(record.leaveDate, 'YYYY-MM-DD') })
        this.leaveDateDateString = moment(record.leaveDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('patientBirthday', { initialValue: moment(record.patientBirthday, 'YYYY-MM-DD') })
        this.patientBirthdayDateString = moment(record.patientBirthday).format('YYYY-MM-DD')
        this.form.getFieldDecorator('createDate', { initialValue: moment(record.createDate, 'YYYY-MM-DD') })
        this.createDateDateString = moment(record.createDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('modifyDate', { initialValue: moment(record.modifyDate, 'YYYY-MM-DD') })
        this.modifyDateDateString = moment(record.modifyDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('deleteDate', { initialValue: moment(record.deleteDate, 'YYYY-MM-DD') })
        this.deleteDateDateString = moment(record.deleteDate).format('YYYY-MM-DD')
      },
      handleSubmit () {
        const { form: { validateFields } } = this
        this.confirmLoading = true
        validateFields((errors, values) => {
          if (!errors) {
            for (const key in values) {
              if (typeof (values[key]) === 'object') {
                values[key] = JSON.stringify(values[key])
              }
            }
            values.operDate = this.operDateDateString
            values.illnessDate = this.illnessDateDateString
            values.visitDate = this.visitDateDateString
            values.leaveDate = this.leaveDateDateString
            values.patientBirthday = this.patientBirthdayDateString
            values.createDate = this.createDateDateString
            values.modifyDate = this.modifyDateDateString
            values.deleteDate = this.deleteDateDateString
            OutpMrEdit(values).then((res) => {
              if (res.success) {
                this.$message.success('编辑成功')
                this.confirmLoading = false
                this.$emit('ok', values)
                this.handleCancel()
              } else {
                this.$message.error('编辑失败：' + JSON.stringify(res.message))
              }
            }).finally((res) => {
              this.confirmLoading = false
            })
          } else {
            this.confirmLoading = false
          }
        })
      },
      onChangeoperDate(date, dateString) {
        this.operDateDateString = dateString
      },
      onChangeillnessDate(date, dateString) {
        this.illnessDateDateString = dateString
      },
      onChangevisitDate(date, dateString) {
        this.visitDateDateString = dateString
      },
      onChangeleaveDate(date, dateString) {
        this.leaveDateDateString = dateString
      },
      onChangepatientBirthday(date, dateString) {
        this.patientBirthdayDateString = dateString
      },
      onChangecreateDate(date, dateString) {
        this.createDateDateString = dateString
      },
      onChangemodifyDate(date, dateString) {
        this.modifyDateDateString = dateString
      },
      onChangedeleteDate(date, dateString) {
        this.deleteDateDateString = dateString
      },
      handleCancel () {
        this.form.resetFields()
        this.visible = false
      }
    }
  }
</script>
